import Vue from "vue";
import "./plugins/axios";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./registerServiceWorker";
import "./styles.scss";
import ElementUI from "element-ui";
import locale from "element-ui/lib/locale/lang/zh-CN";
import "./styles.scss";
import mixin from "./mixin";
import mavonEditor from "mavon-editor";
import "mavon-editor/dist/css/index.css";

Vue.use(ElementUI, { locale });
Vue.use(mavonEditor);
Vue.mixin(mixin);

/**
 * 解决页面切换滚动不置顶的问题
 */
router.afterEach(() => {
  window.scrollTo(0, 0);
});

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
